# preview of v0.2.0
library(ggplot2)
library(plotly)
library(colorrepel)
# original data
a <- readRDS("umap_gg.rds")
# static image can be converted to interactive (hover-able) plot with plotly
ggplotly(a)
# color_repel plus text label
# normal static image
b <- gg_color_repel(a, repel_label = T, nudge_x = 2, nudge_y = 2, force = 10)
b

# ggrepel texts are not supported by plotly
# new label text layer is lost in conversion
plotly::ggplotly(b)
# move repel text to background layer
# now best of both worlds
ggplotly_background(a)
# can move encircle geom to background layer too
ggplotly_background(a, repel_label = T, encircle = T)